//
//  OrderCell.h
//  Order
//
//  Created by funny on 12-3-21.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>


@class OrderCell;

@protocol OrderCellDelegate <NSObject>

@optional

- (void)OrderCellDelegate:(OrderCell *)orderCell packageCountDidChangeTo:(NSInteger)packageCount inRow:(NSInteger)row;
- (void)OrderCellDelegate:(OrderCell *)orderCell singleCountDidChangeTo:(NSInteger)singleCount inRow:(NSInteger)row;

@end


@interface OrderCell : UITableViewCell {
	NSInteger row;
	
	NSInteger packageCount;
	NSInteger singleCount;
	
	UILabel *name;
	
	UILabel *packageCountLabel;
	UILabel *singleCountLabel;
	
	id <OrderCellDelegate> orderDelegate;
}

@property (nonatomic, assign) NSInteger row;
@property (nonatomic, readonly) NSInteger packageCount;
@property (nonatomic, readonly) NSInteger singleCount;

@property (nonatomic, assign) id <OrderCellDelegate> orderDelegate;

- (void)refreshWithName:(NSString *)newName andPackageCount:(NSInteger)newPackageCount andSingleCount:(NSInteger)newSingleCount;

@end
